const user = {
    namespaced: true,
    state: {
        token: "我是token",
        network: true,
        userId: null,
        userEmail:null,
    },
    mutations: {
        loginSuccess(state, data) {
            state.token = data
        },
        changeNetwork(state, data) {
            state.network = data
        },
        setUserId(state,data){
            state.userId=data
        },
        setUserEmail(state,data){
            state.userEmail=data
        }
    },
    actions: {
        setToken({commit},data){
            commit("loginSuccess",data)
        },
        setUserId({commit},data){
            commit("setUserId",data)
        },
        setUserEmail({commit},data){
            commit("setUserEmail",data)
        }
    }
}
export default user